import request from '@/utils/request'
import { download } from '@/utils/request'

// 新增三观不正题
export function addSgbz(data) {
  return request({
    url: '/businessCore/faThreeOutlooksQuestions',
    method: 'post',
    data
  })
}

// 修改三观不正题
export function updateSgbz(data) {
  return request({
    url: '/businessCore/faThreeOutlooksQuestions',
    method: 'put',
    data
  })
}

// 删除三观不正题
export function delSgbz(id) {
  return request({
    url: '/businessCore/faThreeOutlooksQuestions/' + id,
    method: 'delete'
  })
}

// 获取三观不正题
export function getSgbz(id) {
  return request({
    url: '/businessCore/faThreeOutlooksQuestions/' + id,
    method: 'get'
  })
}

// 导出三观不正题
export function exportSgbz(params, fileName) {
  const url = '/businessCore/faThreeOutlooksQuestions/export'
  download(
    url,
    params,
    fileName + `_${new Date().getTime()}.xlsx`
  )
}